<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AlterTableOptimizeIndexMybank extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('mybank_balance_unfreeze_record', function (Blueprint $table) {
            $table->index('merchantId','idx_merchantId');
            $table->index('withholdId','idx_withholdId');
            $table->index('outTradeNo','idx_outTradeNo');
            $table->index('finishDateTime','idx_finishDateTime');
        });

        Schema::table('mybank_batch_no_record', function (Blueprint $table) {
            $table->index('billRecordId','idx_billRecordId');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('mybank_balance_unfreeze_record', function (Blueprint $table) {
            $table->dropIndex("idx_merchantId");
            $table->dropIndex("idx_withholdId");
            $table->dropIndex("idx_outTradeNo");
            $table->dropIndex("idx_finishDateTime");
        });

        Schema::table('mybank_batch_no_record', function (Blueprint $table) {
            $table->dropIndex("idx_billRecordId");

        });
    }
}
